<?
	$facadeClass = 'switch48port';
	switch ($device->os->getPhysicalPortsCount()) {
		case 48:
		case 50:
			$facadeClass = 'switch48port';
			break;	
		case 24:
		case 26:
			$facadeClass = 'switch24port';
			break;			
	}


?>
<div class="graph_ping_status"><h3>Device Status / Response Times</h3><img src="/graph.php?device=<?=$device->id?>&type=pingTimes&width=820&height=100&legend=0"/></div>
<div>
	<h3 class="iconSystemMonitor">Network Traffic</h3>
	<img src="/graph.php?device=<?=$device->id?>&type=deviceTraffic&width=820&height=100&legend=0"/>
</div>
<div>
	<h3 class="iconInterfaces">Port Status</h3>
	<div class="device_facade <?=$facadeClass?>">
		<div class="section section1"></div>
		<div class="section section2"></div>
		<div class="section section3"></div>
<?
	$i = 1;
	$j = 1;
	foreach ($device->interfaces AS $port) {
		switch ($port->ifType) {
			case 117:
			case 6:
				echo '<div class="led led'.$i.' '.($i%2?'odd':'even').' ';
				switch ($port->getHighSpeed(false)) {
					case '1000': echo 'gigabit'; break;
					case '100': echo 'ethernet'; break;
				}
				echo '"></div>';				
				echo '<a href="/device/'.$device->id.'/interface/'.$port->ifIndex.'/" title="Click to View Port Details"v class="port port'.$i.' '.($i%2?'odd':'even').' '.$port->getStatus().'"></a>';
				echo '<div class="label label'.$i.' '.($i%2?'odd':'even').'">'.$i.'</div>';
				$i++;
				break;			
		}
	
	}
?>
	</div>
</div>
<div>
	<h3 class="iconLightBulb">Recent Events</h3>
</div>